{% load price_ride %}
{% load order_filter %}
{% load static %}
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="{% static 'css/iconfont.css' %}">
	<link rel="stylesheet" href="{% static 'css/global.css' %}">
	<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
	<link rel="stylesheet" href="{% static 'css/bootstrap-theme.min.css' %}">
	<link rel="stylesheet" href="{% static 'css/swiper.min.css' %}">
	<link rel="stylesheet" href="{% static 'css/styles.css' %}">
	<script src="{% static 'js/jquery.1.12.4.min.js' %}" charset="UTF-8"></script>
	<script src="{% static 'js/bootstrap.min.js' %}" charset="UTF-8"></script>
	<script src="{% static 'js/swiper.min.js' %}" charset="UTF-8"></script>
	<script src="{% static 'js/global.js' %}" charset="UTF-8"></script>
	<script src="{% static 'js/jquery.DJMask.2.1.1.js' %}" charset="UTF-8"></script>
	<title>X袋网</title>
</head>
<body>
	<!-- 顶部tab -->
	<div class="tab-header">
		<div class="inner">
			<div class="pull-left">
				<div class="pull-left">嗨，欢迎来到<span class="cr">X袋网</span></div>
				<a href="agent_level.html">网店代销</a>
				<a href="temp_article/udai_article4.html">帮助中心</a>
			</div>
			<div class="pull-right">
                {% if username %}
				    <a href=""><span class="cr">{{ username }}</span></a>
                {% else %}
                    <a href="{% url 'login_register:login' %}"><span class="cr">登录</span></a>
                {% endif %}
				<a href="login.html?p=register">注册</a>
				<a href="{% url 'account_info:udai_welcome' %}">我的X袋</a>
				<a href="{% url 'order_from:udai_order' %}">我的订单</a>
				<a href="udai_integral.html">积分平台</a>

			</div>
		</div>
	</div>
	<!-- 顶部标题 -->
	<div class="bgf5 clearfix">
		<div class="top-user">
			<div class="inner">
				<a class="logo" href="index.html"><img src="{% static 'images/icons/logo.jpg' %}" alt="X袋网" class="cover"></a>
				<div class="title">购物车</div>
			</div>
		</div>
	</div>
	<div class="content clearfix bgf5">
		<section class="user-center inner clearfix">
			<div class="user-content__box clearfix bgf">
				<div class="title">购物车-订单支付 </div>
				<div class="shop-title">收货地址</div>

				<form action="{% url 'order_from:pay_page' id=order.order_id%} " class="shopcart-form__box" method="post">
                {% csrf_token %}
					<div class="addr-radio">

                            {% if de_site %}
                                <div class="radio-line radio-box active">
                                <label class="radio-label ep" title="{{ de_site.province }}&nbsp;{{ de_site.city }}&nbsp;{{ de_site.district }}&nbsp;{{ de_site.street }}&nbsp;{{ de_site.detailed_address }}&nbsp;
                                ({{ de_site.name }}收) &nbsp;{{ de_site.cell_phone | hidden }}">
								<input name="addr" checked="" value="{{ de_site.site_id }}" autocomplete="off" type="radio"><i class="iconfont icon-radio"></i>
								{{ de_site.province }}&nbsp;{{ de_site.city }}&nbsp;{{ de_site.district }}&nbsp;{{ de_site.street }}&nbsp;{{ de_site.detailed_address }}&nbsp;
                                ({{ de_site.name }}收) &nbsp;{{ de_site.cell_phone | hidden }}
							    </label>
                                <a href="javascript:;" class="default">默认地址</a>
							    <a href="udai_address_edit.html" class="edit">修改</a>
                                </div>
                            {% else %}
                                {% for site in sites %}
                                <div class="radio-line radio-box">
                                    <label class="radio-label ep" title="{{ site.province }}&nbsp;{{ site.city }}&nbsp;{{site.district }}&nbsp;{{ site.street }}&nbsp;{{ site.detailed_address }}&nbsp;
                                        ({{ site.name }}收) &nbsp;{{ site.cell_phone | hidden }}">
                                        <input name="addr" value="{{ site.site_id }}" autocomplete="off" type="radio"><i class="iconfont icon-radio"></i>
                                        {{ site.province }}&nbsp;{{ site.city }}&nbsp;{{site.district }}&nbsp;{{ site.street }}&nbsp;{{ site.detailed_address }}&nbsp;
                                        ({{ site.name }}收) &nbsp;{{ site.cell_phone | hidden }}
                                    </label>

                                </div>
                                {% endfor %}
                            {% endif %}




					</div>
					<div class="add_addr"><a href="{% url 'account_info:udai_address' %}">添加新地址</a></div>
					<div class="shop-title">确认订单</div>
					<div class="shop-order__detail">
						<table class="table">
							<thead>
								<tr>
									<th width="120"></th>
									<th width="300">商品信息</th>
									<th width="150">单价</th>
									<th width="200">数量</th>
									<th width="200">运费</th>
									<th width="80">总价</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<th scope="row"><a href="item_show.html"><div class="img"><img src="{% static 'images/temp/M-003.jpg' %}" alt="" class="cover"></div></a></th>
									<td>
										<div class="name ep3">{{ good.goods_name }}</div>
										<div class="type c9">颜色分类：{{ good_info.goods_info_color }}  尺码：{{ good_info.goods_info_size }}</div>
									</td>
									<td>¥{{ good_info.goods_info_price }}</td>
									<td>{{ order.goods_number }}</td>
                                    {% if order.payable_freight %}
									    <td>¥{{ order.payable_freight }}</td>
                                    {% else %}
                                        <td>¥0.0</td>
                                    {% endif %}
									<td>¥{{ order.payable_amount }}</td>
								</tr>

							</tbody>
						</table>
					</div>
					<div class="shop-cart__info clearfix">
						<div class="pull-left text-left">
							<div class="info-line text-nowrap">购买时间：<span class="c6">{{ order.create_time| filter_time}}</span></div>
                             {% if order.type == '0' %}
                                <div class="info-line text-nowrap">交易类型：<span class="c6">普通订单</span></div>
                             {% elif  order.type == '1' %}
							    <div class="info-line text-nowrap">交易类型：<span class="c6">团购订单</span></div>
                             {% elif  order.type == '2' %}
                                <div class="info-line text-nowrap">交易类型：<span class="c6">限时抢购</span></div>
                            {% endif %}
							<div class="info-line text-nowrap">交易号：<span class="c6">1001001830267490496</span></div>
						</div>
						<div class="pull-right text-right">
{#							<div class="form-group">#}
{#								<label for="coupon" class="control-label">优惠券使用：</label>#}
{#								<select id="coupon" name="coupon">#}
{#									<option value="-1" selected>- 请选择可使用的优惠券 -</option>#}
{#                                    {% for cou in coupon_list %}#}
{#									    <option value="{{ cou.coupon_id }}">【{{ cou.coupon_rule }}】</option>#}
{#								    {% endfor %}#}
{#								</select>#}
{#							</div>#}
							<script>
								$('#coupon').bind('change',function() {
									console.log($(this).val());
								})
							</script>
							<div class="info-line">优惠活动：<span class="c6">无</span></div>
                                    {% if order.payable_freight %}
									   <div class="info-line">运费：<span class="c6">¥{{ order.payable_freight }}</span></div>
                                    {% else %}
                                        <div class="info-line">运费：<span class="c6">¥0.0</span></div>
                                    {% endif %}

							<div class="info-line"><span class="favour-value">已优惠 ¥0.0</span>合计：<b class="fz18 cr">¥{{ order.payable_amount }}</b></div>
							<div class="info-line fz12 c9">（可获 <span class="c6">{{ good_info.goods_info_intergral }}</span> 积分）</div>
						</div>
					</div>
					<div class="shop-title">确认订单</div>
					<div class="pay-mode__box">
						<div class="radio-line radio-box">
							<label class="radio-label ep">
								<input name="pay-mode" value="1" autocomplete="off" type="radio"><i class="iconfont icon-radio"></i>
								<span class="fz16">余额支付</span><span class="fz14">（可用余额：¥{{ user.user_integral }}）</span>
							</label>
							<div class="pay-value">支付<b class="fz16 cr">{{ order.payable_amount }}</b>元</div>
						</div>
						<div class="radio-line radio-box">
							<label class="radio-label ep">
								<input name="pay-mode" value="2" autocomplete="off" type="radio"><i class="iconfont icon-radio"></i>
								<img src="{% static 'images/icons/alipay.png' %}" alt="支付宝支付">
							</label>
							<div class="pay-value">支付<b class="fz16 cr">{{ order.payable_amount }}</b>元</div>
						</div>
						<div class="radio-line radio-box">
							<label class="radio-label ep">
								<input name="pay-mode" value="3" autocomplete="off" type="radio"><i class="iconfont icon-radio"></i>
								<img src="{% static 'images/icons/paywechat.png' %}" alt="微信支付">
							</label>
							<div class="pay-value">支付<b class="fz16 cr">{{ order.payable_amount }}</b>元</div>
						</div>
					</div>
					<div class="user-form-group shopcart-submit">
						<button type="submit" class="btn">继续支付</button>
					</div>
					<script>
						$(document).ready(function(){
							$(this).on('change','input',function() {
								$(this).parents('.radio-box').addClass('active').siblings().removeClass('active');
							})
						});
					</script>
				</form>

			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item">
				<a href="udai_welcome.html" class="r-item-hd">
					<i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_shopcart.html" class="r-item-hd">
					<i class="iconfont icon-cart"></i>
					<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_collection.html" class="r-item-hd">
					<i class="iconfont icon-aixin"></i>
					<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="" class="r-item-hd">
					<i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="issues.html" class="r-item-hd">
					<i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
				</a>
			</li>
			<li class="r-toolbar-item to-top">
				<i class="iconfont icon-top"></i>
				<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
			</li>
		</ul>
		<script>
			$(document).ready(function(){ $('.to-top').toTop({position:false}) });
		</script>
	</div>
	<!-- 底部信息 -->
	<div class="footer">
		<div class="footer-tags">
			<div class="tags-box inner">
				<div class="tag-div">
					<img src="{% static 'images/icons/footer_1.gif' %}" alt="厂家直供">
				</div>
				<div class="tag-div">
					<img src="{% static 'images/icons/footer_2.gif' %}" alt="一件代发">
				</div>
				<div class="tag-div">
					<img src="{% static 'images/icons/footer_3.gif' %}" alt="美工活动支持">
				</div>
				<div class="tag-div">
					<img src="{% static 'images/icons/footer_4.gif' %}" alt="信誉认证">
				</div>
			</div>
		</div>
		<div class="footer-links inner">
			<dl>
				<dt>X袋网</dt>
				<a href="temp_article/udai_article10.html"><dd>企业简介</dd></a>
				<a href="temp_article/udai_article11.html"><dd>加入X袋</dd></a>
				<a href="temp_article/udai_article12.html"><dd>隐私说明</dd></a>
			</dl>
			<dl>
				<dt>服务中心</dt>
				<a href="udai_article1.html"><dd>售后服务</dd></a>
				<a href="temp_article/udai_article2.html"><dd>配送服务</dd></a>
				<a href="temp_article/udai_article3.html"><dd>用户协议</dd></a>
				<a href="temp_article/udai_article4.html"><dd>常见问题</dd></a>
			</dl>
			<dl>
				<dt>新手上路</dt>
				<a href="temp_article/udai_article5.html"><dd>如何成为代理商</dd></a>
				<a href="temp_article/udai_article6.html"><dd>代销商上架教程</dd></a>
				<a href="temp_article/udai_article7.html"><dd>分销商常见问题</dd></a>
				<a href="temp_article/udai_article8.html"><dd>付款账户</dd></a>
			</dl>
		</div>
		<div class="copy-box clearfix">
			<ul class="copy-links">
				<a href="agent_level.html"><li>网店代销</li></a>
				<a href="class_room.html"><li>X袋学堂</li></a>
				<a href="udai_about.html"><li>联系我们</li></a>
				<a href="temp_article/udai_article10.html"><li>企业简介</li></a>
				<a href="temp_article/udai_article5.html"><li>新手上路</li></a>
			</ul>
			<!-- 版权 -->
			<p class="copyright">
				© 2005-2018 X袋网 版权所有，并保留所有权利。 技术支持：<a style="font-family:'Microsoft Yahei'; color:#666;" href="http://www.jsdaima.com/" title="js代码" target="_blank">js代码</a><br>
				ICP备案证书号：ICP备XXXXXXXX号&nbsp;&nbsp;&nbsp;&nbsp;中国北京朝阳区环球国际金融中心大厦99F&nbsp;&nbsp;&nbsp;&nbsp;Tel: 18888888888&nbsp;&nbsp;&nbsp;&nbsp;E-mail: 18888888888@qq.com
			</p>
		</div>
	</div>
</body>
</html>